perm filename MAN2X[1,ALS] blob sn#534323 filedate 1980-09-07 generic text, type T, neo UTF8
Page Numbers: Yes X: 527 Y: -.5" First Page: 3 Not-on-first-page
Margins:  Top: 1.1" Bottom: 1" Binding: -5
Heading: Not-on-first-page ~x2q(635)\30g1G81g2G

Section 2: Basic Features~y756x2qc\b25B

Essential E~x2c\f2b12f9B

1.  Introduction~x2e18j\f5b15f0B

E is a display-oriented text editor available on the Stanford A.I.
Laboratory PDP-10 computer.  It is not a document editor, although it does
provide some facilities for getting a document into a pleasing format.  It
is regularly used by many people for writing programs and for the
preparation of the texts that are subsequently used as inputs to more
elaborate document editors.  The primary emphasis is that of speed, both
in terms of the number of key strokes required of the user and in terms of
the demands made on the computer system.  At the same time, E is easy to
learn and it offers a large range of facilities that are not available on
many editors.  E is an in-place editor and version copies are not made
unless the user specifically arranges for this to be done.~x2e12j

This is an introductory manual, intended to be used as an aid for the
beginner as well as for experienced computer users who either are
unfamiliar with the E editor or use it infrequently.  This manual is not
intended as a replacement for the on-line E manuals but rather as a
concise statement of the capabilities of the E editor that can be used to
see what facilities E offers for handling specific tasks.  In the
interests of simplicity, most of the explanations will be in terms of the
use of the DataDisc terminals with only occasional reference to DataMedia
terminals.~x2e12j

Two on-line E documents are available.~x2e12j

ETEACH is an teaching program that guides the beginner, step by step, into
the use of E.  The only initial information needed is that of how to log
on the system.  Having logged on, the user simply types HELP ETEACH
followed by a carriage return.  The program then instructs the user, step
by step.  Even the experienced computer user may profit from a brief
session with this program. ~x2e12j\f1 6f0 199f1 11f0

The second on-line document, E.ALS[UP,DOC], is an all-inclusive E manual.
It can be referenced by typing ET?<CR> to the system or by typing
<CONTROL>?, if currently editing some other file.  Frequent references
will be made to this on-line manual in the present publication.  The
directory on page 1 and the index of all commands on page 3 of this
on-line document will be found most useful in locating additional
information. ~x2e12j\29f1 1f0 1f1 11f0 64f1 8f0 27f1 12f0 121b1B153b

2.  Basic Features~x2e12j\f5b

2.1 Paging~x2e12j\b

A typical E file is made up of a number of separate pages of differing
lengths, where each page is restricted to some logically related
sub-section of the total text.  It is not necessary to adjust the page
size to that desired for the finished document as there are a number of
commands that allow one to break pages into smaller pages and to combine
several small pages into one large page.  It is also possible to bring
several contiguous pages into core together when this is desirable.  E
functions best if the size of the individual pages is limited to perhaps
200 or 300 lines of text, although E is quite capable of handling very
large pages indeed, but only at a substantial cost in terms of speed and
of the load on the system.~x2e12j\737b

Normally, only a single page is kept in core while it is being edited and
changes in this page are not copied onto the disk unless requested or
until one moves to another page or leaves the editor.  This greatly
decreases the demands on the system. It allows one to undo all of the
recent corrections to the page being edited by a single command, if
desired.  It has the unfortunate effect that an entire page of recent
corrections can be lost if the system should go down before the user has
issued a save command or has done so indirectly by going to another page
or another file or by exiting from E.  Because of paging, there is no
practical limit to the size of the files that can be edited by E, other
than the limit imposed by the computer system itself.~x2e12jk40

E provides special facilities for moving from page to page within any one
file and for moving between files, with the information as to the recently
visited files, including the page and line locations, kept in an internal
stack so that one can return to these locations with a minimum of effort.
One can move or copy text from any file so visited to other locations in
this file or to any location in any other file.~x2e12jk40

2.2 File Formatting~x2e12j\b20B

E expects the file that is being edited to be formatted internally in a
particular way.  Please note that this file formatting has to do with the
way that the file is stored in the computer and it has nothing to do with
the text formatting per se. A file created by E will, of course, be
automatically formatted.  Should the user attempt to edit an unformatted
file, E will prompt with the options that are available.  While it is
possible to use E with unformatted files, the user is strongly urged to
allow files that occupy more than one page to be formatted.  An
unformatted copy can be made, if necessary, after editing has been
completed. ~x2e12jk80

Formatted files have a special first page that is created by E and
automatically kept up to date as changes are made to the text.  This
directory page tells E where each page starts in the disk copy of the
file, thus simplifying the work required for E to write or read a page of
text.  This first page also contains the text of the first line of each
normal page.  This text can be searched by special commands to locate the
page on which some desired information may be found.  There are special
commands that will cause E to search through an entire page and list
certain types of information on a newly generated first line, to aid in
this process.  For texts where these special commands are not applicable,
the user can still make this first page into an effective table of
contents by manually putting the desired information on the first line of
each page.~x2e12jk40

2.3 The Window~x2e12jk80\b

As mentioned earlier, E is a display-oriented editor.  Since the screen
size will not usually permit the display of an entire page of text, E
exhibits the text that is being edited as if through a window, there being
special single-character commands that move this window around on a page
of the text.  One line of text within the window, the ARROW LINE, is
marked with an arrow to its left.  More will be said about this later.
Also, when editing a line of text, a CURSOR will underline one character
in this ARROW LINE.~x2e12jk40\344f1 10f0 114f1 6f0 38f1 10f0

As an aid to the user, E provides certain bits of information on the
screen, in addition to the text itself, that tell the user something about
the file that is being editing and the state of the editing.  This
information is contained in a top and bottom πborder line', the top called
the header line and the bottom called the trailer line.  These lines may
contain either a series of asterisks, indicating that there is no more
text in the header or trailer direction, or a series of dots, indicating
that there is some text in the indicated direction that is in core but
that does not show in the window.~x2e12jk40\256g1G85b1B

The header line also contains the following:~x2e6j

1 The number of the text line that appears just below the header
line.~x2e6j

2 The number(s) of the in-core page(s).~x2j

3 The name of the file being edited.

4 Some information as to the editing mode (to be explained later).~x2j

The trailer line also contains:~x2e6j

1 The number of the current line (at the arrow) that will be entered if
one starts to type.~x2e6j

2 The total number of lines on the current page.~x2j

3 The number of the current page.

4 The total number of pages in the file being edited.~x2j

5 Some information about the size of the page in core (do an ET? for more
details).~x2j\62f1 3f0

In addition to the trailing line there is a region below it where typed-in
information is echoed and where certain bits of information are typed out,
either to inform the user of the status of his editing or to answer
certain questions that he can ask.For example, the message "Rippling" may
appear here to signify that E is readjusting the disk assignment of your
file in response to an increase in the size of a page.  Two commands
(6XTERSE<CR> and 6XVERBOSE<CR>) enable the user to either restrict or
expand the amount of information that E provides.  There may also be two
lines of information above the heading line (the WHO lines) that contain
system information.~x2e12jk40\435f3 1f0 1f1 9f0 5f3 1f0 1f1 11f0 162f1 3f0

2.4 Special Keys~x2e12jk80\b

There are two rather special keys on the DataDisc keyboard.  These keys,
the CONTROL and META keys, are always used with other keys to control
their meaning and they must always be depressed before, and held down
during, the striking of the associated key (just as one uses the SHIFT and
TOP keys).  In general, these special keys transform all of the normal
typewriter keys into E commands.  In this and other manuals these keys are
indicated either by <CONTROL> and <META> in angle brackets, as here shown,
or by a short-hand notation consisting of a for <CONTROL> and b for
<META>, ab for both <CONTROL> and <META>, and finally, 6 for those cases
where it is optional to use either the <CONTROL> key alone or both the
<CONTROL> and <META> keys (but not the <META> key alone).  The EDIT key on
the DataMedia keyboard takes the place of the CONTROL key but there is no
equivalent key to the META key. Instead, one must precede the character in
question with holding the EDIT key and typing the NUL key.~x2e12jk40\77f1
7f0 5f1 4f0 185f1 5f0 5f1 3f0 164f1 9f0 5f1 6f0 78f4 1f0 6f1 8f0 7f4 1f0
5f1 8f4 2f1 1f0 8f1 10f0 5f1 6f0 15f3 1f0 56f1 8f0 24f1 10f0 3f1 7f0 19f1
6f0 18f1 4f0 54f1 7f0 43f1 4f0 75f1 4f0 20f1 3f0

For example, to get ab<CR> on a DataDisc, hold down the <CONTROL> and
<META> keys then depress the <CR> key.  To get this on a DataMedia, hold
down the <EDIT> key, then depress the <NUL> key, and then, still holding
the <EDIT> key, depress the <CR> key.~x2e6j\20f4 2f1 4f0 30f1 9f0 5f1 6f0
23f1 4f0 48f1 7f0 23f1 5f0 34f1 6f0 18f1 4f0

The exact meaning of the CONTROL and META keys if used separately or
together varies with the conditions.  Remember: do not type the character
a or b, but rather use the special keys that are thus referenced.
~x2e12jk40\25f1 7f0 5f1 4f0 66i9I27f4 1f0 4f4 1f0

Numerical arguments are frequently used with certain commands.  Arguments
will be indicated in this manual by the symbol # or by a typical numerical
example.  When the CONTROL and/or META keys are indicated, these keys must
be held down for all digits of the number. ~x2e12jk40\168f1 7f0 8f1 4f0

There are several other keys on the DataDisc keyboard that are used for
special purposes by E.  These will be referenced by their names in angle
brackets, such as: <FORM>, <VT>, <BS>, <LINE>, <ALT>.  The carriage return
key (marked <RETURN> on the DataDisc and DataMedia keyboards and
referenced in this manual as <CR>) also is used for several special
purposes, as will be noted later. These keys are not held down while
striking other keys although they may be used with the CONTROL and META
keys.  See Appendix A for the corresponding keys on the
DataMedia.~x2e12jk40\164f1 6f0 2f1 4f0 2f1 4f0 2f1 6f0 2f1 5f0 35f1 8f0
74f1 4f0 159f1 7f0 5f1 4f0

2.5 To Start an Editing Session Using E~x2e12jk80\b

To start an editing session using E one types ET FOO<CR> where FOO is the
name of an existing file.  If one wants to create a new file named FOO,
the system command is CET FOO<CR>.  E allows files to be opened in either
the READ-WRITE mode or in a READ-ONLY mode.  One enters a file in the
READ-ONLY mode by using ER instead of ET or by typing /R between the end
of the name and the <CR>.  The /R is called a switch, of which there are
several, as will be explained later.  The READ-ONLY mode should always be
used if one wishes to read a file but not to make any changes to it.  When
in this mode, edited changes may be made in the in-core copy but E will
not permit this copy to be written out on the disk unless the mode is
changed to READ-WRITE.~x2e12jk40\46f1 2f0 1f1 7f0 7f1 3f0 75f1 3f0 24f1
11f0 45f1 10f0 14f1 9f0 33f1 9f0 15f1 2f0 12f1 2f0 13f1 3f0 37f1 4f0 8f1
1f0 82f1 9f0 251f1 10f0

2.6 E Commands~x2e12jk80\b

Most of the commands used in E are single characters typed with the
CONTROL and/or the META keys.  These characters are usually mnemonics for
the type of action that is being called for, but this is not always
possible and some of them will simply have to be learned through frequent
use.  A few keys, such as the <CR> key, can be used as single-character E
commands without the use of the CONTROL or META key.  Other keys, if typed
without the CONTROL or META key, will simply cause the indicated character
to appear in the text, as explained in detail below.~x2e12jk40\68f1 7f0
12f1 4f0 223f1 4f0 72f1 7f0 4f1 4f0 40f1 7f0 4f1 4f0

Since there are many more commands than there are letters, some of the
less frequently used (or more dangerous) commands require the typing of
several letters.  These commands all begin with 6X (for eXtend) followed
by enough letters from the name (without special keys) to disambiguate the
command.  If not enough letters are typed, E will complain and ask you to
retype the command.  6X commands are terminated by a carriage return <CR>
or in a few special cases by some other activating character.  They often
allow for extra parameters, to be typed between the name and the
termination.~x2e12jk40\191f3 1f0 194f3 1f0 47f1 4f0

The <ALT> key performs a rather special function in E, that of aborting
any partially-typed command.  In general, when one discovers that one is
typing the wrong thing, it is usually safer and easier to type <ALT> than
to try some other means of correcting the error.  In particular, <ALT>
will: abort any partially typed 6X command; restore any line currently
being edited in the LINE-EDIT or INSERT mode (to be discribed later) to
its previous contents; terminate and abort any search or substitute
command being typed.~x2e12jk40\4f1 5f0 199f1 5f0 71f1 5f0 33f3 1f0 58f1
9f0 4f1 6f0

Many E commands will accept a prefixed numerical argument, as will be
explained in more detail later.  It may be worth noting at this time that
most of these commands may be made to report some information concerning
the command, without actually executing it, by using a zero prefixed
argument.  This is often a very useful way of finding out what the command
might do or what its current mode of operation may be.  Information so
reported is typed out at the bottom of the screen.~x2e12jk40

2.7 Editing Modes~x2e12jk80\b18B

The various options available to the user are grouped together into a few
distinct modes.  The default mode that E enters initially is called the
NORMAL mode and this is the mode from which one enters most of the other
modes.  Many of the commands that may be used in the different modes will
be described later.  For the moment, it is important to recognize the
existence of these different modes, since some commands have quite
different actions in the different modes, and to learn a few of the
commands that are so affected.~x2e12jk40\145f1 7f0

2.7.1 The NORMAL Mode~x2e12jk40\i10f1 7f0

The NORMAL mode allows for movement between files, from page to page and
within the page to arrive at any desired line.  In normal editing, one
will switch from this mode to other modes, as required, and will return to
this mode frequently.  Commands that affect, or relate to, an entire page
or entire file are also executed in this mode.  In fact, much of the power
of the E editor resides in the large array of commands that are available
in the NORMAL mode. ~x2e12jk40\4f1 6f0 440f1 6f0

While in the NORMAL mode, an arrow appears on the screen, to the left of
the text.  The line on which the arrow appears will be called the ARROW
LINE.  On some terminals, in particular on the DataMedia, the ARROW LINE
is identified by an underscore or CURSOR under the first character of the
line.~x2e12jk40\13f1 6f0 120f1 10f0 58f1 5f0 1f1 4f0 35f1 6f0

Some special NORMAL mode commands should be learned at this
time.~x2e12jk40\13f1 7f0

64<CR> Move the ARROW down 4 lines (but not beyond the trailer
line).~x2e6jk40\f3 1f0 1f1 6f0 8f1 7f0

a<CR> No action when in this mode but used to return to it from other
modes.~x2jk40\f4 1f1 5f0

b<CR> Introduce an empty line ahead of the ARROW LINE.~x2jk40\f4 1f1 4f0
38f1 10f0

ab<CR> Enter the LINE-INSERT mode (see below) and introduce an empty line
as the ARROW LINE.~x2jk40\f4 2f1 4f0 11f1 11f0 53f1 11f0

D Enter the LINE-EDIT mode and overwrite the first character in the ARROW
LINE with a "D".~x2e6jk40\13f1 10f0 46f1 11f0 11f1

63aD Enter the LINE-EDIT mode and delete the first 3 characters in the
ARROW LINE.~x2jk40\f3 1f0 1f4 1f0 12f1 9f0 47f1 10f0

bD Enter the LINE-EDIT mode and insert the character "D" ahead of the
first character.~x2jk40\f4 1f0 13f1 10f0

66abD Delete 6 lines starting with the ARROW-LINE.~x2jk40\f3 1f0 1f4 2f0
36f1 11f0

2.7.2 The LINE-EDIT Mode~x2e12jk40\i5f1 2f0 4f1 9f0

This mode is used for making deletions, corrections and additions to text.
It is frequently entered from the NORMAL mode simply by starting to type,
using any one of the normal typewriter keys without any of the special
control keys that are used to identify E commands.  Many of the commands
that are used to move around within a line of text may also be used to
enter the LINE-EDIT mode, as will be explained later.~x2e12jk40\112f1 6f0
259f1 9f0

While in this mode, any typing that is done will appear in the ARROW LINE,
and a CURSOR (underscore) will appear under the character position where
the next typed character will be placed.  On the DataMedia, the ARROW LINE
will appear brighter than the other lines so as to differentiate the
LINE-EDIT mode (where the CURSOR is used as just discribed) from the
NORMAL mode (where the CURSOR is used to indicate the ARROW
LINE).~x2e12jk40\63f1 5f0 1f1 4f0 8f1 6f0 126f1 5f0 1f1 4f0 70f1 9f0 17f1
6f0 37f1 6f0 17f1 6f0 25f1 5f0 1f1 4f0

The carriage return key (<CR>) is normally used to terminate the LINE-EDIT
mode and to return to the NORMAL mode with the ARROW moved to the next
line.  It will perform this function even when the CURSOR is not at the
end of the line being edited and the line will be written into the in-core
copy in the same form as it appears on the screen.  To insert a carriage
return into the line at the CURSOR position (when in the LINE-EDIT mode)
one must use the b<CR> command, as will be explained in detail
later.~x2e12jk40\25f1 4f0 36f1 9f0 27f1 6f0 15f1 5f0 70f1 6f0 4i3I184f1
6f0 23f1 9f0 24f4 1f1 4f0

E does not automatically start a new line of text after some fixed number
of characters (as some editors do), so the user must break his lines by
typing carriage returns (or by any one of several special commands, as
noted in section 5,3 below).~x2e12jk40

While E is capable of dealing with very long lines by use of some special
commands, lines of text as typed must not exceed 133 characters in length.
This limitation comes about because E makes use of the System Line Editor,
which has such a limit.  Offsetting this limitation is the feature that
the line is actually copied whenever one enters the LINE-EDIT mode and the
original in-core line may be left unaltered by a single command (the <ALT>
key) should one wish to abort the current changes at any time before
typing the final <CR>.~x2e12jk40\349f1 9f0 83f1 5f0 87f1 4f0

2.7.3 The INSERT Mode~x2e12jk40\i5f1 2f0 4f1 6f0

This mode is used when one wants to insert a substantial amount of new
text in a line.  It is entered from the LINE-EDIT mode or the NORMAL mode
by typing aI.  While in this mode, everything that one types (including
carriage returns) will be inserted in the line.  It also differs from the
LINE-EDIT mode in that the newly typed text is inserted into the old text
(that is, it does not overwrite), with the displaced text being moved
along to make room.  In this mode, the carriage return, <CR>, without
control key, does not terminate the mode but instead causes a carriage
return to be inserted into the text.  This mode is usually terminated by
typing a<CR>.  The INSERT mode differs from the LINE-INSERT mode (to be
discribed next) in that the <ALT> key may be used to restore the line to
its original condition (but only back to the last typed <CR>, if one has
been typed while in the INSERT mode).~x2e12jk40\112f1 10f0 12f1 6f0 16f4
1f0 107f1 3f0 2f1 1f0 21f1 11f0 190f1 4f0 162f4 1f1 4f0 6f1 8f0 22f1 11f0
41f1 5f0 96f1 4f0 37f1 6f0

2.7.4 The LINE-INSERT Mode~x2e12jk40\i5f1 2f0 4f1 11f0

This mode is used when one wishes to insert one or more lines of text
between existing lines.  It is entered from the NORMAL and INSERT modes by
typing abI or ab<CR>.  While in this mode, everything that is typed
(including carriage returns) will appear in the text.  This mode is
distinguished by the presence of the letter "I" in the header line and by
the use of a double arrow in place of a single arrow in front of the ARROW
line.  It is terminated by typing a<CR> or <ALT>.  The a<CR> command, if
given at the beginning of a new line, will allow the empty line to remain
in the text, while the <ALT> command will abort the empty line (but it
will not abort a line containing text, as it does in the INSERT mode).
~x2e12jk40\118f1 6f0 5f1 6f0 17f4 2f0 5f4 2f1 4f0 259f1 5f0 36f4 1f1 4f0
4f1 5f0 7f4 1f1 4f0 110f1 5f0 48i3I49f1 6f0

2.7.5 The ATTACH mode~x2e12jk40\i11f1 6f0

While in this mode, a selected portion of the text is removed from the
in-core text and is held in a special ATTACH buffer in such a way that it
can be moved around within the opened file, or even moved to another file,
by using the same commands that are used in the NORMAL mode.  At all
times, the text in the ATTACH buffer (or the first few and last few lines,
if the selection is longer than a certain size) is shown on the screen at
the position in the in-core text where it will be deposited should the
appropriate release command be given. This mode is distinguished by the
presence of the letter "A" in the header line and by vertical bars to the
left of the attached text (brightening on the DataMedia).  The commands
for entering and leaving this mode will be described
later.~x2e12jk40\109f1 7f0 152f1 6f0 38f1 6f0 228b1B239b

2.8 Saving Corrections and Exiting from E~x2e12j\b42B

The command 6.  causes the recently typed text to be written onto the
disk.  Please note that the period is the command.  One should also note
that the process of going to another page or of switching to another file
also causes all corrections and additions to be written onto the
disk.~x2e12jk40\13f3 1f0b1B

To end the session and save recently made corrections type 6E.  To end the
session without saving the recently typed text, type 6XQUIT<CR>.  One can,
of course, exit by using the <CALL> key but this does not restore the
screen as does the 6XQUIT command.  After exiting, it is possible to
reinstate the editor and redisplay the text by the system command
CONTINUE.  It is also possible to exit from E and go directly to certain
other programs.~x2e12j\59f3 1f0 68f3 1f0 1f1 8f0 41f1 6f0 54f3 1f0 1f1 4f0
110f1 8f0

6XGO<CR> Exit from E as with 6E and then repeat the last RPG command.
This is an easy

way to get back to a compiler after making corrections to a
program.~x2e6j\f3 1f0 1f1 6f0 22f3 1f0 27f1 3f0

6XRSYS <program><CR> Exit from E as with 6E and run the system program as
specified.~x2e3j\f3 1f0 1f1 5f0 9f1 4f0 21f3 1f0

6XRUN <program><CR> Exit from E as with 6E and run the user program as
specified.~x2e3j\f3 1f0 1f1 3f0 10f1 4f0 21f3 1f0

6XDRD<CR> Exit from E as with 6E and run the system program
DIRED.~x2e3j\f3 1f0 1f1 8f0 23f3 1f0 29f1 5f0

~x2e12j